]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: Only initialize global->xdisplay on X11 compositors
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 31 Jan 2019 11:03:34 +0000 (12:03 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 24 May 2019 10:24:06 +0000 (12:24 +0200)
This is just used to set up things that are relevant to X11 compositors
(XDND, XFixes input region). We can live with it unset on the wayland
compositor cases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378

src/shell-global.c

index 4ad23fdac0822edd6a4dbf1f18efcd210a5ef953..e696a324c8d218b4931cdd9d986e32e8ac440854 100644 (file)
@@ -61,8 +61,6 @@ struct _ShellGlobal {
 
   MetaDisplay *meta_display;
   MetaWorkspaceManager *workspace_manager;
-  GdkDisplay *gdk_display;
-  MetaX11Display *x11_display;
   Display *xdisplay;
 
   char *session_mode;
@@ -849,10 +847,6 @@ _shell_global_set_plugin (ShellGlobal *global,
   display = meta_plugin_get_display (plugin);
   global->meta_display = display;
   global->workspace_manager = meta_display_get_workspace_manager (display);
-  global->x11_display = meta_display_get_x11_display (display);
-  global->xdisplay = meta_x11_display_get_xdisplay (global->x11_display);
-
-  global->gdk_display = gdk_x11_lookup_xdisplay (global->xdisplay);
 
   global->stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
 
@@ -862,6 +856,8 @@ _shell_global_set_plugin (ShellGlobal *global,
     }
   else
     {
+      MetaX11Display *x11_display = meta_display_get_x11_display (display);
+      global->xdisplay = meta_x11_display_get_xdisplay (x11_display);
       global->stage_xwindow = clutter_x11_get_stage_window (global->stage);
     }